from django.contrib import admin
from django.urls import path

from apitest import views
from apptest import appviews
from webtest import webviews
from product import proviews
from set import setviews
from bug import bugviews
from django.views import static  ##新增
from django.conf import settings  ##新增
from django.conf.urls import url  ##新增

urlpatterns = [
    path('', views.login),
    path('admin/', admin.site.urls),
    #  path('test/', views.test),
    path('login/', views.login),
    path('logout/', views.logout),
    path('index/', views.index),
    # 产品=========================================================================
    path('product_manage/', proviews.product_manage),
    path('productsearch/', proviews.productsearch),
    # 单一接口=========================================================================
    url(r'^apis_manage/$', views.apis_manage),
    path('apis_manage_list/', views.apis_manage_list),
    path('manual_req_singleInterface/', views.manual_req_singleInterface),
    path('apis_suite/', views.apis_suite),
    path('apis_suite_list/', views.apis_suite_list),
    path('manual_req_apissuite/', views.manual_req_apissuite),
    # 流程接口=========================================================================
    path('apitest_suite/', views.apitest_suite),
    path('apitest_suite_list/', views.apitest_suite_list),
    path('manual_req_apitestsuite/', views.manual_req_apitestsuite),
    path('apitest_manage/', views.apitest_manage),
    path('apitest_manage_search/', views.apitest_manage_search),
    path('manual_req_processInterface/', views.manual_req_processInterface),
    path('apistep_manage/', views.apistep_manage, name='apistep_manage'),
    path('apistep_search/', views.apistep_search),
    # app=========================================================================
    path('appcase_manage/', appviews.appcase_manage),
    path('appcasestep_manage/', appviews.appcasestep_manage, name='appcasestep_manage'),
    path('appsearch/', appviews.appsearch),
    path('appstepsearch/', appviews.appstepsearch),
    # web UI=========================================================================
    path('webcase_manage/', webviews.webcase_manage),
    path('webcasestep_manage/', webviews.webcasestep_manage, name='webcasestep_manage'),
    path('websearch/', webviews.websearch),
    path('webstepsearch/', webviews.webstepsearch),
    path('webtest_report/', webviews.webtest_report),
    # 测试报告=========================================================================
    path('apitest_report/', views.apitest_report),
    path('apptest_report/', appviews.apptest_report),
    path('test_report/', views.bug_report),
    # 系统设置=========================================================================
    path('set_manage/', setviews.set_manage),
    path('setsearch/', setviews.setsearch),
    path('usersearch/', setviews.usersearch),
    path('user/', setviews.set_user),
    # bug=========================================================================
    path('bug_manage/', bugviews.bug_manage),
    path('bugsearch/', bugviews.bugsearch),
    # 定时任务=========================================================================
    path('periodic_task/', views.periodic_task),
    path('periodic_task_list/', views.periodic_task_list),
    path('periodictask_search/', views.periodictask_search),
    path('manual_periodictasks/', views.manual_periodictasks),

    url(r'^static/(?P<path>.*)$', static.serve,
        {'document_root': settings.STATIC_ROOT}, name='static'),
]
